Optimal. Leaf size=227 \[ \frac {315 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{2048 \sqrt {2} a^{7/2} d}+\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}}+\frac {3 i \cos (c+d x)}{32 a d (a+i a \tan (c+d x))^{5/2}}+\frac {21 i \cos (c+d x)}{256 a^2 d (a+i a \tan (c+d x))^{3/2}}+\frac {105 i \cos (c+d x)}{1024 a^3 d \sqrt {a+i a \tan (c+d x)}}-\frac {315 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{2048 a^4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 227, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3583, 3571,
3570, 212} \begin {gather*} \frac {315 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{2048 \sqrt {2} a^{7/2} d}-\frac {315 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{2048 a^4 d}+\frac {105 i \cos (c+d x)}{1024 a^3 d \sqrt {a+i a \tan (c+d x)}}+\frac {21 i \cos (c+d x)}{256 a^2 d (a+i a \tan (c+d x))^{3/2}}+\frac {3 i \cos (c+d x)}{32 a d (a+i a \tan (c+d x))^{5/2}}+\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3570
Rule 3571
Rule 3583
Rubi steps
\begin {align*} \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^{7/2}} \, dx &=\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}}+\frac {9 \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^{5/2}} \, dx}{16 a}\\ &=\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}}+\frac {3 i \cos (c+d x)}{32 a d (a+i a \tan (c+d x))^{5/2}}+\frac {21 \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx}{64 a^2}\\ &=\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}}+\frac {3 i \cos (c+d x)}{32 a d (a+i a \tan (c+d x))^{5/2}}+\frac {21 i \cos (c+d x)}{256 a^2 d (a+i a \tan (c+d x))^{3/2}}+\frac {105 \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx}{512 a^3}\\ &=\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}}+\frac {3 i \cos (c+d x)}{32 a d (a+i a \tan (c+d x))^{5/2}}+\frac {21 i \cos (c+d x)}{256 a^2 d (a+i a \tan (c+d x))^{3/2}}+\frac {105 i \cos (c+d x)}{1024 a^3 d \sqrt {a+i a \tan (c+d x)}}+\frac {315 \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx}{2048 a^4}\\ &=\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}}+\frac {3 i \cos (c+d x)}{32 a d (a+i a \tan (c+d x))^{5/2}}+\frac {21 i \cos (c+d x)}{256 a^2 d (a+i a \tan (c+d x))^{3/2}}+\frac {105 i \cos (c+d x)}{1024 a^3 d \sqrt {a+i a \tan (c+d x)}}-\frac {315 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{2048 a^4 d}+\frac {315 \int \frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx}{4096 a^3}\\ &=\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}}+\frac {3 i \cos (c+d x)}{32 a d (a+i a \tan (c+d x))^{5/2}}+\frac {21 i \cos (c+d x)}{256 a^2 d (a+i a \tan (c+d x))^{3/2}}+\frac {105 i \cos (c+d x)}{1024 a^3 d \sqrt {a+i a \tan (c+d x)}}-\frac {315 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{2048 a^4 d}+\frac {(315 i) \text {Subst}\left (\int \frac {1}{2-a x^2} \, dx,x,\frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}}\right )}{2048 a^3 d}\\ &=\frac {315 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{2048 \sqrt {2} a^{7/2} d}+\frac {i \cos (c+d x)}{8 d (a+i a \tan (c+d x))^{7/2}}+\frac {3 i \cos (c+d x)}{32 a d (a+i a \tan (c+d x))^{5/2}}+\frac {21 i \cos (c+d x)}{256 a^2 d (a+i a \tan (c+d x))^{3/2}}+\frac {105 i \cos (c+d x)}{1024 a^3 d \sqrt {a+i a \tan (c+d x)}}-\frac {315 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{2048 a^4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.49, size = 141, normalized size = 0.62 \begin {gather*} -\frac {\sec ^3(c+d x) \left (420+\frac {630 e^{4 i (c+d x)} \tanh ^{-1}\left (\sqrt {1+e^{2 i (c+d x)}}\right )}{\sqrt {1+e^{2 i (c+d x)}}}+826 \cos (2 (c+d x))-224 \cos (4 (c+d x))+474 i \sin (2 (c+d x))-288 i \sin (4 (c+d x))\right )}{4096 a^3 d (-i+\tan (c+d x))^3 \sqrt {a+i a \tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 399 vs. \(2 (184 ) = 368\).
time = 0.86, size = 400, normalized size = 1.76
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (8192 i \left (\cos ^{9}\left (d x +c \right )\right )+8192 \sin \left (d x +c \right ) \left (\cos ^{8}\left (d x +c \right )\right )-5120 i \left (\cos ^{7}\left (d x +c \right )\right )-1024 \sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )+64 i \left (\cos ^{5}\left (d x +c \right )\right )+315 i \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \cos \left (d x +c \right )+576 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )+315 i \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+168 i \left (\cos ^{3}\left (d x +c \right )\right )+315 \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \sin \left (d x +c \right )+840 \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-1260 i \cos \left (d x +c \right )\right )}{8192 d \,a^{4}}\) | \(400\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 2779 vs. \(2 (172) = 344\).
time = 0.67, size = 2779, normalized size = 12.24 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 300, normalized size = 1.32 \begin {gather*} \frac {{\left (-315 i \, \sqrt {\frac {1}{2}} a^{4} d \sqrt {\frac {1}{a^{7} d^{2}}} e^{\left (8 i \, d x + 8 i \, c\right )} \log \left (-\frac {315 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (i \, a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a^{3} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{7} d^{2}}} - i\right )} e^{\left (-i \, d x - i \, c\right )}}{1024 \, a^{3} d}\right ) + 315 i \, \sqrt {\frac {1}{2}} a^{4} d \sqrt {\frac {1}{a^{7} d^{2}}} e^{\left (8 i \, d x + 8 i \, c\right )} \log \left (-\frac {315 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (-i \, a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{3} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{7} d^{2}}} - i\right )} e^{\left (-i \, d x - i \, c\right )}}{1024 \, a^{3} d}\right ) + \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-128 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 197 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 535 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 298 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 104 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 16 i\right )}\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{4096 \, a^{4} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\cos \left (c+d\,x\right )}{{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{7/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________